package pchi.pchicamera;

import java.util.ArrayList;

import pchi.pchicamera.adapters.FullScreenImageAdapter;
import pchi.pchicamera.data.Contants;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager;

public class FullScreenImageActivity extends Activity {

	private FullScreenImageAdapter adapter;
	private ViewPager viewPager;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_fullscreen_view);
		viewPager = (ViewPager) findViewById(R.id.pager);

		Intent i = getIntent();
		int position = i.getIntExtra(Contants.Position, 0);

		ArrayList<String> imagesPath = Apps.getPhotosData().getImagesPath();
		if (imagesPath == null)
			return;

		adapter = new FullScreenImageAdapter(FullScreenImageActivity.this, imagesPath);
		viewPager.setAdapter(adapter);
		viewPager.setCurrentItem(position);
	}

}
